package com.qf.serviceimpl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.mapper.DtsOrderMapper;
import com.qf.pojo.DtsOrder;
import com.qf.service.DtsOrderService;
import com.qf.vo.OrderCountVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Ypl
 * @version V1.0
 * @Project September-mavens
 * @Package com.qf.serviceimpl
 * @Description:
 * @Date 2022/10/13 20:18
 */
@Service
public class DtsOrderServiceImpl implements DtsOrderService {

    @Autowired
    DtsOrderMapper dtsOrderMapper;

    @Override
    public long getCount() {

        LambdaQueryWrapper<DtsOrder> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(DtsOrder::getDeleted,false);
        return dtsOrderMapper.selectCount(wrapper);
    }

    @Override
    public List<OrderCountVo> findOrders() {
        return dtsOrderMapper.findOrders();
    }
}
